package output

import "sync"

type WalData struct {
	Data      map[string]interface{}
	Timestamp int64
	Topic     string
	Key       string
}

var datapool = sync.Pool{New: func() interface{} { return &WalData{} }}

func NewWalData() *WalData {
	data := datapool.Get().(*WalData)
	return data
}

func Pop(data *WalData)  {
	defer datapool.Put(data)
}

